<?php
class UsiaUserModel extends CI_Model {
	function getUsia($userid){
//		$sql = "select max(USIAID) from usiauser where USERID = $userid";
		$sql = "select USIAID from usiauser where USERID = $userid";
		$data = $this->db->query($sql);
		return $data;		
	}
	
	function saveUsia($usiaid, $userid) {
		$sql = "insert into usiauser (USIAID, USERID) values($usiaid, $userid)";
		$data = $this->db->query($sql);
		return $data;
	}
}
?>